﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ThanhTu.GNC.Media.KQXS.DataAccess.DAL;
using ThanhTu.GNC.Media.KQXS.DataAccess.DO;

namespace ThanhTu.GNC.Media.KQXS.DataAccess.BL
{
    public class KindOfAwardsBL : IDisposable
    {
        private KindOfAwardsDAL vKindOfAwardsDAL = null;
        private bool disposed = false;
        public KindOfAwardsBL()
        {
            if (vKindOfAwardsDAL == null)
            {
                vKindOfAwardsDAL = new KindOfAwardsDAL();
            }
        }
        ~KindOfAwardsBL() { Dispose(false); }

        #region IDisposable Members

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (!disposed)
            {
                if (disposing)
                {
                    if (vKindOfAwardsDAL != null)
                    {
                        vKindOfAwardsDAL.Dispose();
                        vKindOfAwardsDAL = null;
                    }
                }

                disposed = true;
            }
        }

        #endregion
        public int Save(KindOfAwardsDO vKindOfAwardsDO) { return vKindOfAwardsDAL.Save(vKindOfAwardsDO); }
        public int delete(int AwardsID) { return vKindOfAwardsDAL.delete(AwardsID); }
        public KindOfAwardsDO getbyAwards(int AwardsID) { return vKindOfAwardsDAL.getbyAwards(AwardsID); }
        public List<KindOfAwardsDO> SelectALLAwards() { return vKindOfAwardsDAL.SelectALLAwards(); }
    }
}
